import request from '@/utils/request';
import { getToken } from "@/utils/auth";

export function loginByUsername(username, password) {
  return request({
    url: process.env.VUE_APP_SERVICE_NAME + 'api/sysUser/login',
    method: 'post',
    data: {
      "userName": username,
      "password": password
    },
    showLoading: true // 提示作用，以后默认为true
  });
}

export function getLeftMenus() {
  return request({
    url: process.env.VUE_APP_SERVICE_NAME + 'api/sysMenu/getUserMenuTree',
    method: 'get',
    params: {
      "operationId": getToken()
    }
  });
}

